<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>中质国检 | 查询结果</title>
        <link rel="shortcut icon" type="image/x-icon" href="../frontend/images/glory.ico" />
        <link rel="bookmark" type="image/x-icon" href="../frontend/images/glory.ico" />
        <link rel="stylesheet" type="text/css" href="../frontend/css/public.css" />
        <meta name="keywords" content="正品配件,认证检测,通知配件,中质国检" />
        <meta name="description" content="中质国检-致力于正品配件的认证备案、认证委托、正品配件查询、配件追溯的服务平台。" />
        <link rel="stylesheet" type="text/css" href="../frontend/css/index.css" />
        <link rel="stylesheet" type="text/css" href="../frontend/css/footer.css" />
        <link href="font-awesome/css/font-awesome.css" rel="stylesheet"/>
        <link href="css/cars.css" rel='stylesheet' type='text/css' />

    </head>
    <body>

        <!-- PAGE -->
        <section id="page" style="background-color:#fff;">
            <!-- HEADER -->
            <header  class="header " id="top_menu">

                <!-- #include virtual = "../frontend/header.html" -->  
                <!--link rel="import" href="../frontend/header.html" -->

                <!--/NAV-BAR -->
            </header>
            <!--/HEADER -->
            <!-- LOGO -->
              <div class="search_bar">
            <div class="w">
                <div class="home_logo">
                    <img src="../frontend/images/logo.png" alt=""/>
                    <a href="#" class="logo_text">中质国检</a>

                </div>

                <div class="info_text">
                    <p>经过国家质量认证中心（CQC）认证</p>
                    <p>国家唯一认定推行查询平台</p>
                    <p>涵盖正厂件，CCC件，同质件，事故件，拆车件</p>
                </div>

                <div class="heading-mun-home">
                    <div id="Tab1">
                        <div class="Menubox">
                            <ul>
                                <li id="one1" onmouseover="set('one', 1, 4)" class="hover">编码</li>
                                <li id="one2" onmouseover="set('one', 2, 4)" class="">产品</li>
                                <li id="one3" onmouseover="set('one', 3, 4)" class="">生产厂家</li>
                            </ul>
                        </div>
                        <div class="Contentbox1">
                            <div id="con_one_1" class="hover" style="display: block;">
                                <input type="text" value="" id="production_code" class="tow" placeholder="请输入产品编码">
                                    <button class="tow1" id="search_code">搜索</button>
                                    <form action="" method="get">
                                        <label>
                                            <input name="option_code" type="radio" value="unicode" checked/>统一编码</label>
                                        <label>
                                            <input name="option_code" type="radio" value="cert_number"/>CQC证书编号</label>
                                        <label>
                                            <input name="option_code" type="radio" value="serial_number"/>序列号</label>
                                        <label>
                                            <input name="option_code" type="radio" value="batch_number"/>产品批号</label>
                                        <label>
                                            <input name="option_code" type="radio" value="hs_code"/>海关码</label>
                                        <label>
                                            <input name="option_code" type="radio" value="oe_code"/>OE码</label>
                                    </form>
                            </div>
                            <div id="con_one_2" style="display: none;">
                                <input type="text" value="" id="production_name" class="tow" placeholder="请输入产品名称">
                                    <button class="tow1" id="search_production">搜索</button>
                                    <form action="" method="get">
                                        <label><input name="option_production" type="radio" value="1" checked/>正厂件</label>
                                        <label><input name="option_production" type="radio" value="2"/>同质件</label>
                                        <label><input name="option_production" type="radio" value="4"/>CCC件</label>
                                        <label><input name="option_production" type="radio" value="8"/>拆车件</label>
                                        <label><input name="option_production" type="radio" value="16"/>易损件</label>
                                        <label><input name="option_production" type="radio" value="32"/>事故件</label>
                                    </form>
                            </div>
                            <div id="con_one_3" style="display: none;">
                                <input type="text" value="" id="production_factory" class="tow" placeholder="请输入产品生产厂家">
                                    <button class="tow1" id="search_factory">搜索</button>
                                    <form action="" method="get">

                                        <label><input name="option_factory" type="radio" value="factory_brand" checked/>品牌</label>
                                        <label><input name="option_factory" type="radio" value="car_type"/>车型</label>
                                        <label><input name="option_factory" type="radio" value="factory_produce"/>生产厂家</label>
                                    </form>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        
            <!-- 导航 -->
        
        <!-- /导航 -->
            
            

            <div class="divide-30"></div>

        </section>
        <div id="main-content"></div>

        <script src="js/jquery/jquery-2.0.3.min.js"></script>
        <script src="bootstrap-dist/js/bootstrap.min.js"></script>
        <script type="text/javascript">
            $(function () {
                $('#top_menu').load('../frontend/header.php');

                handleCustomTabs();
            });
        </script>




       
        <script type="text/javascript">

            var LocString = String(window.document.location.href);
            //alert(LocString);
            function getQueryStr(str) {
                var rs = new RegExp("(^|)" + str + "=([^/&]*)(/&|$)", "gi").exec(LocString);
                var tmp;
                if (tmp = rs) {
                    return tmp[2];
                }
                return "";
            }

            function GetRequest() {
                var url = location.search; //获取url中"?"符后的字串 
                //alert(url);
                var theRequest = new Object();
                if (url.indexOf("?") !== -1) {
                    var str = url.substr(1);
                    strs = str.split("&");
                    for (var i = 0; i < strs.length; i++) {
                        //alert(strs);
                        theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
                    }
                }
                return theRequest;
            }

            /*-----------------------------------------------------------------------------------*/
            /*	Custom tabs
             /*-----------------------------------------------------------------------------------*/
            var handleCustomTabs = function () {
                var adjustMinHeight = function (y) {
                    $(y).each(function () {
                        var A = $($($(this).attr("href")));
                        var z = $(this).parent().parent();
                        if (z.height() > A.height()) {
                            A.css("min-height", z.height())
                        }
                    })
                };
                $("body").on("click", '.nav.nav-tabs.tabs-left a[data-toggle="tab"], .nav.nav-tabs.tabs-right a[data-toggle="tab"]', function () {
                    adjustMinHeight($(this))
                });
                adjustMinHeight('.nav.nav-tabs.tabs-left > li.active > a[data-toggle="tab"], .nav.nav-tabs.tabs-right > li.active > a[data-toggle="tab"]');
                if (location.hash) {
                    var w = location.hash.substr(1);
                    $('a[href="#' + w + '"]').click()
                }
            }
            
            function openDetails(id,certid){
                window.open("single_info.php?parts_id="+ id + '&cert_id=' +  certid);
                /*
                $.get("single_info.php", { "parts_id" : id, "cert_id" : certid },
                            function(data){
                              //alert("Data Loaded: " + data);
                              $("#main-content").html(data);
                            });
                            */
            }

        </script>

        <script type="text/javascript">
            $(function () {
                //alert(1);
                
                 var Request = new Object();
                 Request = GetRequest();
                 var type = Request["type"];
                 //var code = Request['code'];
                 //console.log(type);
                 //alert(code);
                 //console.log(code);
                 
                 //type=getQueryStr('type');
                 code = getQueryStr('code');
                 console.log(type);
                 //alert(code);
                 console.log(code);
                 
                 /*
                 if (type === '') {
                 //return;
                 }else{
                 $.get("actions/searchNewParts.php", {"type": type, "code": code},
                 function (data) {
                 //alert("Data Loaded: " + data);
                 $("#main-content").html(data);
                 });
                 }
                  */
                 search(type,code);
                 



            });

        </script>
        
        <script type="text/javascript">
            function search(t,c){
                if (t === '') {
                 //return;
                 }else{
                 $.get("actions/searchNewParts.php", {"type": t, "code": c},
                 function (data) {
                 //alert("Data Loaded: " + data);
                 $("#main-content").html(data);
                 });
                 }
            }
        </script>
        
       <!--搜索栏-->
        <script>
            <!--
                /*第一种形式 第二种形式 更换显示样式*/
            function set(name, cursel, n) {
                //alert('name:' + name + 'cursel:' + cursel + 'n:' + n);
                for (i = 1; i <= n; i++) {
                    //alert(i);
                    if (document.getElementById(name + i)) {
                        var menu = document.getElementById(name + i);
                        //alert(menu);
                        var con = document.getElementById("con_" + name + "_" + i);
                        //alert(con);
                        menu.className = i == cursel ? "hover" : "";
                        con.style.display = i == cursel ? "block" : "none";
                    } else {
                        //alert('aaa');
                    }
                }
            }
        </script>
        
        <script type="text/javascript">
        $(function(){
            $('#search_code').click(function(e){
               
               var cur_code_type = $('input:radio[name=option_code]:checked').val();
               var code = $('#production_code').val();
               //alert(code);
              
               //if(cur_code_type === 'unicode'){
                   window.open('../backend/search_parts.html?type=' + cur_code_type + '&code=' + encodeURI(code));
               //}
               
            });
            
            $('#search_production').click(function(e){
               
               var cur_code_type = $('input:radio[name=option_production]:checked').val();
               var code = $('#production_name').val();
               //alert(code);
              
               //if(cur_code_type === 'unicode'){
                   window.open('../backend/search_parts.html?type=' + cur_code_type + '&code=' + encodeURI(code));
               //}
               
            });
            
            
            $('#search_factory').click(function(e){
               
               var cur_code_type = $('input:radio[name=option_factory]:checked').val();
               var code = $('#production_factory').val();
               //alert(code);
              
               //if(cur_code_type === 'unicode'){
                   window.open('../backend/search_parts.html?type=' + cur_code_type + '&code=' + encodeURI(code));
               //}
               
            });
        });
        </script>
        <script type="text/javascript">
            function logout() {
                //alert(2222);
                var changeUrl = "../backend/actions/logout.php";
                //window.alert(changeUrl);
                $.get(changeUrl, function (str) {
                    //alert(str);
                });
                window.location = '../frontend/';
            }
        </script>
    </body>
</html>
